package com.pdf.pdfserver.util;

/**
 * @Author songfz
 * @Description 字符串数据处理工具
 * @Date 2022/1/5
 */
public class StringUtil {


    public static Boolean isEmpty(String context) {
        context = context.trim();
        return context.length() == 0 || context.equalsIgnoreCase("null");
    }

    public static String getText(String content){
        //剔出<html>的标签
        //去除字符串中的空格,回车,换行符,制表符
        String txtcontent = content.replaceAll("</?[^>]+>", "")
                .replaceAll("<a>|\\s*|\t|\r|\n|</a>", "")
                .replaceAll(" +","");
        return txtcontent;
    }

}
